//
//  MTTaskInviteInfo.swift
//  MT
//
//  Created by ooops on 2020/5/26.
//  Copyright © 2020 张强. All rights reserved.
//

import Foundation
import ObjectMapper

///// 聚会任务类型1招募中、2进行中、3已结束、4申请、5拒绝、6通过
///// 聚会任务任务列表 - 聚会任务状态
//enum MTPartyListTaskStatusType: Int {
//    /// 招募中
//    case wating = 1
//    /// 已经开始 - 进行中
//    case started = 2
//    /// 已经结束
//    case ended = 3
//    /// 申请中 - 未通过审核
//    case invite
//    /// 被拒绝
//    case reject
//    /// 已通过申请
//    case accept
//}

class MTTaskInviteInfoModel: Mappable {
    
    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?
    
    var result: [MTTaskInviteInfoSubModel]?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
    }
}

class MTTaskInviteInfoSubModel: Mappable {
    /// 地区
    var area: String?
    /// 城市
    var city: String?
    /// 是否已经加入聚会任务
    var joinStatus: Int?
    /// 等级
    var levelName: String?
    /// 聚会名字 - 标题
    var name: String?
    /// 申请人昵称
    var nickname: String?
    /// 省
    var province: String?
    /// 俱乐部Id
    var partyId: Int?
    /// 申请备注
    var remark: String?
    /// 角色类型1发起人2参与人
    var roleType: Int?
    /// 用户标签
    var tagList: [String]?
    /// 用户头像
    var userHref: String?
    /// 用户id
    var userId: Int?
    /// 发布者极光ID
    var userName: String?
    /// age
    var age: Int?
    /// pushId
    var pushId: Int?
    
    /// 聚会任务详情数据
    var partyTaskVo: MTPartyTaskListInfoModel?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        area <- map["area"]
        city <- map["city"]
        pushId <- map["pushId"]
        joinStatus <- map["joinStatus"]
        levelName <- map["levelName"]
        name <- map["name"]
        nickname <- map["nickname"]
        province <- map["province"]
        partyId <- map["partyId"]
        remark <- map["remark"]
        roleType <- map["roleType"]
        tagList <- map["userTag"]
        userHref <- map["userHref"]
        userId <- map["userId"]
        userName <- map["userName"]
        age <- map["age"]
        partyTaskVo <- map["partyTaskVo"]
    }
}
